package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class HelloServiceImpl implements HelloService {
    static Random random = new Random();

    public String sayHelloA(String name) {
        System.out.println("methodA:" + name);
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodA:" + name;
    }

    public String sayHelloB(String name) {
        System.out.println("methodB:" + name);
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodB:" + name;
    }

    public String sayHelloC(String name) {
        System.out.println("methodC:" + name);
        try {
            Thread.sleep(random.nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "methodC:" + name;
    }
}
